import com.mysql.jdbc.Driver;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;

public class jdbc {
    public static void main(String[] args) throws SQLException {
        Driver driver = new Driver();
        String url="jdbc:mysql://localhost:3306/zlf_db02";
        Properties properties=new Properties();
        properties.setProperty("user","root");
        properties.setProperty("password","123");
        Connection connect= driver.connect(url,properties);
        String sql="insert into t1 values('19','张林帆','踢足球')";
        Statement statement = connect.createStatement();
        int i= statement.executeUpdate(sql);
        System.out.println(i);
        statement.close();
        connect.close();
    }
}


